package org.dam.common.utils;

/**
 * @Author dam
 * @create 2023/12/8 21:38
 */
public class ShardingUtil {

    /**
     * 表名后面添加 _%d
     */
    public static final String CREATE_SQL =
            "CREATE INDEX idx_file_bf ON backup_file_%d(backup_source_id,father_id);\n";

    public static final String REMOVE_SQL =
            "DROP TABLE IF EXISTS `backup_file_history_%d`;";

    public static void main(String[] args) {
        for (int i = 0; i < 16; i++) {
            System.out.printf((CREATE_SQL) + "%n", i);
        }

//        for (int i = 0; i < 16; i++) {
//            System.out.printf((REMOVE_SQL) + "%n", i);
//        }
    }
}